<?php

# 自动加载
function Loader($classname)
{
	set_include_path(BASE_PATH);						//设置include目录
    $filePath = BASE_PATH.$classname.'.php';
    $file = str_replace('\\','/',$filePath);
    if (!is_file($file)) {
        var_dump($file);
        throw new \Exception("Class is not exits");
    } else {
        include $file;
    }
}
spl_autoload_register('Loader');


